Guild icon
Project Sekai
πŸ”’ RITSEC CTF 2023 / βœ…-reversing-gauntlet
Avatar
Gauntlet - 500 points
Category: Reversing Description: Four parts of a key are being assembled within this file. The adversary has implemented four corresponding anti-debug checks that need to be bypassed. Good luck! Files:Tags: No tags.
Sutx pinned a message to this channel. 03/31/2023 9:02 AM
Avatar
@crazyman ai wants to collaborate 🀝
Avatar
@Iyed wants to collaborate 🀝
Avatar
@sahuang
10:41
any progress on this one?
Avatar
no i havent started it
Avatar
RS{Quick_check_vector_this_exception_important_time_is_hash_Wa-kcdftcteeioi}
12:26
I'm stuck on the last part
12:26
calculating a hash
Avatar
it checks if we have set any breakpoints
12:26
loops over the ThirdChallenge function
12:27
checks for 0xcc/0xe9
12:27
and there is a counter that it crements
12:27
I don't know what that hash on the flag I sent is incorrect even tho I haven't set any breakpoints
12:28
and I tried to return an arbitrary value myself setting rax to the ThirdChallenge function length but still getting a wrong flag when submitting on the platform
Avatar
Avatar
Iyed
RS{Quick_check_vector_this_exception_important_time_is_hash_Wa-kcdftcteeioi}
wait is this 3 parts or all 4?
12:29
the last part uses the ThirdChallenge functoin
12:29
to calculate the hash
12:29
last part seems not correct from the whole word sense?
Avatar
I think it's just a hash so it shouldn't make sense
12:30
let me check
Avatar
what hash is _hash_?>
Avatar
RS{Quick_check_vector_this_exception_important_time_is_hash_WihclehrtegckPiecidyptf.ntftoelttepeTrigolohde}
12:36
just a thing it calculates
12:36
from a string
12:37
it takes characters and concatenates them
12:38
12:38
only these 2 parts matter right? we shouldn't enter those 2 only ig
12:39
I tried to patch it with nops and only let the 0x90 but still wrong (edited)
Avatar
what are first 3 parts flags?
12:39
splitted
Avatar
RS{Quick_check_ vector_this_exception_ important_time_is _hash_ hash }
Avatar
@TheBadGod wants to collaborate 🀝
Avatar
BreakCheck just checks for breakpoints
12:42
because debuggers insert a 0xcc instruction, which can be detected like this
Avatar
yes but haven't set anyones
12:45
and I patched that check
Avatar
yeah but like there are only these possibilities for after the hash thingy: b'Withinthischallenge,therearefouranti-debuggerchecks.Passingeachcheckwilldecryptpartoftheflag.Onlythefirsttwocheckswillnotifyyouiftheywerebypassed.Theremainingtwowillnot.Author:kindtime\x00' b'Wtihscalnehrrorat-eugrcek.Psigechcildcytprftefa.nytefrttocekilntfofteeebpse.Termiigtowlo.uhridie' b'Whicln,herfrn-bgesPsgaeldrtael.Oyhfstesityoityeps.hraioittrkdm' b'WihclehrtegckPiecidyptf.ntftoelttepeTrigolohde' b'WnsleerutbrcPnceietttlOtithfutwbsTeiwltu:d' b'Wcnhrr-gePgdte.yfteitotep.riord' b'Wta,u-eksckdfltscwtueeioti' b'WhlhtgkiiyfnfotpTioohd' b'Winerbeslt.Ofiyt.aotrm' b'WsertrPcittttftbTilud' b'Wfecgkycr.nlti' b'WchrgPd.fettprod' b'Whrncnfeiesilr\x00' b'Wa-kcdftcteeioi' b'WlrbPetlOttsitd' b'Wlgiifpiod' b'Weoeeenfrrli' b'Wnret.fit.or' b'Wgasctoybn\x00' b'WetPitttTld' b'W,-sdlstit' b'Wegyc.li' b'Wtuapywau' b'Whgftpod' b'WerettuTt' b'Wrcfeeir' b'Weel.Oiom' b'Wkdtteo' b'Wa.rioh' right?
12:51
we can rule out the ones with a null byte as we still need to close the flag with } (edited)
Avatar
so we try one by one?
Avatar
gimme a sec
12:56
mmh, also getting Wa-kcdftcteeioi
12:56
(e.count(b"\xe9")*5+len(list(filter(lambda x: x!=0xe9 and x!=0x90, e)))-e.count(b"\x90"))%30 14
(edited)
13:01
but on check two im not getting the same
13:01
b'evector_this_exception_\x00'
Avatar
yeah pretty sure it should be RS{Quick_check_vector_this_exception_important_time_is_hash_Wa-kcdftcteeioi}
13:22
actually getting one underscore more, but that's gotta be timing issues
13:26
yeah second time around I got the RS{Quick_check_vector_this_exception_important_time_is_hash_Wa-kcdftcteeioi}
Avatar
"we're expecting something different after that W" from what admin told
Avatar
ok, sadly i ran it without a debugger and only then attached the debugger, so they are kinda wrong about that
Avatar
Avatar
TheBadGod
ok, sadly i ran it without a debugger and only then attached the debugger, so they are kinda wrong about that
author said chall could be wrong so he will check it 🀣 but idk how 3 solves come from
13:38
kindtime β€” Today at 1:36 PM Hi all, Gauntlet author here. It’s come to my understanding that there might be an issue with the challenge. I won’t be able to check it for a few hours, but if you are having issues, please come back to it another time. I’ll throw a message in here once I have the opportunity. Thanks
13:38
lol
Avatar
bruh
13:38
also 4 solves now
Avatar
LOL wtf
Avatar
like there can't be anything other than a W given the code we have
Avatar
yeah they said after the W
13:40
but still
13:40
prob sth wrong with them lol
Avatar
Avatar
TheBadGod
yeah but like there are only these possibilities for after the hash thingy: b'Withinthischallenge,therearefouranti-debuggerchecks.Passingeachcheckwilldecryptpartoftheflag.Onlythefirsttwocheckswillnotifyyouiftheywerebypassed.Theremainingtwowillnot.Author:kindtime\x00' b'Wtihscalnehrrorat-eugrcek.Psigechcildcytprftefa.nytefrttocekilntfofteeebpse.Termiigtowlo.uhridie' b'Whicln,herfrn-bgesPsgaeldrtael.Oyhfstesityoityeps.hraioittrkdm' b'WihclehrtegckPiecidyptf.ntftoelttepeTrigolohde' b'WnsleerutbrcPnceietttlOtithfutwbsTeiwltu:d' b'Wcnhrr-gePgdte.yfteitotep.riord' b'Wta,u-eksckdfltscwtueeioti' b'WhlhtgkiiyfnfotpTioohd' b'Winerbeslt.Ofiyt.aotrm' b'WsertrPcittttftbTilud' b'Wfecgkycr.nlti' b'WchrgPd.fettprod' b'Whrncnfeiesilr\x00' b'Wa-kcdftcteeioi' b'WlrbPetlOttsitd' b'Wlgiifpiod' b'Weoeeenfrrli' b'Wnret.fit.or' b'Wgasctoybn\x00' b'WetPitttTld' b'W,-sdlstit' b'Wegyc.li' b'Wtuapywau' b'Whgftpod' b'WerettuTt' b'Wrcfeeir' b'Weel.Oiom' b'Wkdtteo' b'Wa.rioh' right?
well here are all the possibilities
Avatar
Avatar
TheBadGod
(e.count(b"\xe9")*5+len(list(filter(lambda x: x!=0xe9 and x!=0x90, e)))-e.count(b"\x90"))%30 14
(edited)
here how I calculate the amount that's returned
Avatar
Avatar
TheBadGod
we can rule out the ones with a null byte as we still need to close the flag with } (edited)
also ignore this, it actually checks for strlen, which i fucked up
13:44
WetPitttTld
13:44
they can't fucking count
13:44
just tried all of them
Avatar
Avatar
TheBadGod
used /ctf solve
βœ… Challenge solved.
Avatar
LOL wait what
Avatar
they fucked up, ly3dMejri and I both got 14, it got 14 in the program without a debugger and attaching afterwards
Avatar
oh you mean they counted the length wrong?
Avatar
but they say it's like idk 25 or sth
Avatar
Avatar
sahuang
oh you mean they counted the length wrong?
they probably counted, then changed some code which means different amount of instructions => flag changes
13:46
IC
Avatar
because they just do -#0x90 bytes + 5*#0xe9 bytes + #all other bytes
13:46
mod 30
Avatar
ok so hash changed when they prob changed sth and recompiled
Avatar
yeah
13:47
probably
15:48
I was out
15:49
gg
Exported 88 message(s)